<div id="formsuccess" style="display:none">{if isset($errors.status) && $errors.status == "success"}{$errors.dest}{/if}</div>
<form id="moveFolderForm" name="form" action="?module=backoffice&action=AjaxMoveFolderContent" method="post" class="nyroModal">
{t assignTo=title}Move{/t}
{include file="$MODULES_DIR/backoffice/templates/block/modal/ModalTitle.html" title=$title}
<div id="modalContent">
		<table class="modalTable">
            {if count($folderOptionsTab) > 1}
			{if $nbRows > 1}
			<tr><th>{t 1=$nbRows}Select the folder where to move these %s documents{/t}</th></tr>
			{else}
			<tr><th>{t 1=$uniqueRow->getLabel()}Select the folder where to move "%s"{/t}</th></tr>
			{/if}
			{foreach from=$rows item=row}
			<input type="hidden" name="row[]" value="{$row}" />
			{/foreach}
            <input type="hidden" name="folderId" value="{$sourceFolderId}" />
            <tr>
                <td>
                    <select name="form[destFolderId]">
                        {foreach from=$folderOptionsTab item=doc}
                        <option value="{$doc[0]}" {if $doc[0] == $sourceFolderId || $doc[3] == false}disabled="disabled"{/if} {$doc[2]}>{$doc[1]}</option>
                        {/foreach}
                    </select>
                </td>
            </tr>
            <tr>
                <td><input type="checkbox" name="form[goToDestFolder]" /> {t}Display the destination folder after moving{/t}</td>
            </tr>
			{if isset($errors.failed)}
			<tr>
				<td>
					{foreach from=$errors.failed item=value}
						{icon name="warning.png} {$value}<br />
					{/foreach}
				</td>
			</tr>
			{/if}
            {else}
            <tr><th>{t}There is only one folder in this module. You can not move document(s){/t}</th></tr>
            {/if}
		</table>
</div>
{if count($folderOptionsTab) > 1}
{include file="$MODULES_DIR/backoffice/templates/block/modal/ModalFooter.html" label="Déplacer"}
{else}
{include file="$MODULES_DIR/backoffice/templates/block/modal/ModalFooter.html" noButton=true}
{/if}
</form>
